# Maintainer: Eric Bélanger <eric@archlinux.org>
# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=k3b
pkgver=18.08.1
pkgrel=1
epoch=1
pkgdesc="Feature-rich and easy to handle CD burning application"
arch=(x86_64)
url="https://userbase.kde.org/K3b"
license=(GPL)
depends=(libkcddb kcmutils knotifyconfig libmad kfilemetadata knewstuff
         libmpcdec libdvdread libburn qt5-webkit)
makedepends=(extra-cmake-modules kdoctools)
optdepends=('cdrtools: for CD burning with cdrecord'
            'dvd+rw-tools: for DVD burning support'
            'vcdimager: for VCD burning support'
            'emovix: for bootable multimedia CD/DVD support'
            'cdrdao: for disk-at-once (DAO) mode support'
            'cdparanoia: for CD ripping support' 'transcode: for DVD ripping support')
groups=(kde-applications kdemultimedia)
source=("https://download.kde.org/stable/applications/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig})
sha256sums=('ca58a7e0888c35821fa4d442012a5633099cff0abb0e732a3a47ee1143be67ef'
            'SKIP')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid@kde.org>
              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87) # Christoph Feck <cfeck@kde.org>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_INSTALL_LIBEXECDIR=lib \
    -DBUILD_TESTING=OFF \
    -DK3B_ENABLE_PERMISSION_HELPER=ON
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
